home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_outsidesecret.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  133 lines

  1. # Jones 3D Cog Script
  2. #
  3. # Vol_OutsideSecret.cog
  4. #
  5. # Secret Door Script
  6. #
  7. # [CMG]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14. #...........MESSAGES..................................    
  15.     message    startup        
  16.     message    activated    
  17.      
  18.  
  19. #...........ACTORS..................................    
  20.     thing    player                                local
  21.  
  22. #...........PROPS..................................    
  23.     thing    button        
  24.     thing    door0        
  25.     thing    door1        
  26.     sector    doorSector                            local
  27.  
  28. #...........CAMERAS..................................    
  29.     thing    curCam                                local    
  30.     thing    cam1    
  31.  
  32. #...........CAMERA TARGETS..................................    
  33.     thing    camtarget    
  34.  
  35.  
  36. #...........VARIABLES..................................    
  37.     int        open=0                                local
  38.  
  39.  
  40. #...........SOUNDS..................................    
  41.     sound    in_line1=inxj001b.wav                local    #  ...interesting...
  42.     
  43.  
  44. #...........KEYFRAMES..................................    
  45.     keyframe    in_free=in_activate_medium.key    local
  46.  
  47. end
  48.  
  49. # ========================================================================================
  50.  
  51. code
  52.  
  53. startup:
  54.     
  55.     player = GetLocalPlayerThing();
  56.     
  57.     doorSector = GetThingSector(door0);
  58.     SetSectorAdjoins(doorSector, 0);
  59.  
  60.     return;
  61.  
  62. # ........................................................................................
  63.  
  64. activated:
  65.  
  66.         if ((getSenderRef() == button) && (open == 0)) #button is activated
  67.         {
  68.             open = 1;
  69.             StartCutScene(1);
  70.             
  71.             # lock out player control
  72.             SetActorFlags(player, 0x200000);
  73.             
  74.             # cutscene camera tricks
  75.             curCam=GetCurrentCamera();
  76.             SetCameraSecondaryFocus(2, button);
  77.             SetCameraFocus(2, cam1);
  78.             Sleep(0.25);
  79.             SetCurrentCamera(2);
  80.             ResetCameraFOV(0, 0.0);
  81.             
  82.             # player activates the button
  83.             PlayMode(player, 60, 0);
  84.             Sleep(0.1);
  85.             MoveToFrame(button, 1, 0.5);
  86.             Sleep(1.0);
  87.  
  88.             # pan down to the opening doors
  89.             SetCameraInterpSpeed(2, 3);
  90.             SetCameraLookInterp(2,1);
  91.             MoveToFrame(cam1, 1, 1.5);
  92.             Sleep(.5);
  93.             SetCameraSecondaryFocus(2, camtarget);
  94.             
  95.             Sleep(0.5);
  96.             # zoom a little bit
  97.             SetCameraFOV(70, 1, 3);
  98.             
  99.             # clear the sector adjoins, open the doors
  100.             SetSectorAdjoins(doorSector, 1);
  101.             SetPulse(0.1);
  102.             MoveToFrame(door0, 1, 0.5);
  103.             MoveToFrame(door1, 1, 0.5);
  104.             waitforstop(door0);
  105.             SetPulse(0);
  106.             sleep(1.0);
  107.             
  108.             # restore actor
  109.             ClearActorFlags(player, 0x200000);
  110.             
  111.             # restore both cameras
  112.             SetCameraLookInterp(2,0);
  113.             SetCameraFOV(90, 0, 0);
  114.             SetCurrentCamera(curCam);
  115.             SetCameraLookInterp(2,0);
  116.             SetCameraFOV(90, 0, 0);
  117.             EndCutScene();
  118.                 
  119.         }
  120. return;
  121. # ========================================================================================
  122. pulse:
  123.  
  124.     SetPOVShake('0.0 0.0 0.002', '0.0 0.0 0.0', 0.80, 80.0);
  125. return;
  126.  
  127. # ========================================================================================
  128.  
  129.         
  130.         
  131.         
  132. end
  133.